<div class="content"> <!-- Inicio da DIV content -->
    <div id="accordion">
        <h3><a href="#">Lista de pacientes</a></h3>
        <div>
            <table>
                <thead>
                    <tr>
                        <th class="tabela_header">Nome</th>
                        <th class="tabela_header">Prontuario</th>
                        <th class="tabela_header">Leito</th>
                        <th class="tabela_header" width="50px;">&nbsp;</th>
                    </tr>
                </thead>
                <tbody>
                                        <?
                    if (count($paciente) > 0) :
                        $i=0;
                        foreach ($paciente as $item) :
                            if ($i%2 == 0) : $classe = "tabela_content01";
                            else: $classe = "tabela_content02";
                            endif;
                            ?>
                    <tr>
                        <td class="<?= $classe; ?>"><?= $item['IB6NOME']; ?></td>
                        <td class="<?= $classe; ?>"><?= $item['IB6REGIST']; ?></td>
                        <td class="<?= $classe; ?>"><?= $item['C02CODLEITO']; ?></td>
                        <td class="<?= $classe; ?>" width="50px">
                            <a href="<?= base_url() ?>cadastros/pacientes/consultaimagem/<?= $item['IB6REGIST']; ?>/1">
                                <img border="0" title="Enviar" alt="Enviar"
                                     src="<?= base_url() ?>img/form/page_white_edit.png" />
                            </a>
                        </td>
                    </tr>
                                            <?
                            $i++;
                        endforeach;
                    else :
                        ?>
                    <tr>
                        <td class="tabela_content01" colspan="4">Sem registros encontrados.</td>
                    </tr>
                    <? endif; ?>
                </tbody>
                <tfoot>
                    <tr>
                        <th class="tabela_footer" colspan="4">Total de registros: <?=count($paciente); ?></th>
                    </tr>
                </tfoot>
            </table>
        </div>
    </div>
</div>
<script type="text/javascript">

    $(function() {
        $( "#accordion" ).accordion();
    });

</script>   